Skip to content

dtl: Support Basic Authentication for RPC endpoints#2322

Merged
Inphi merged 3 commits intoethereum-optimism:developfrom
Inphi:feat/dtl-auth-config
Mar 16, 2022
Merged

dtl: Support Basic Authentication for RPC endpoints#2322
Inphi merged 3 commits intoethereum-optimism:developfrom
Inphi:feat/dtl-auth-config

Conversation

@Inphi
Copy link
Contributor

@Inphi Inphi commented Mar 14, 2022

Description
Adds optional support for Basic Authentication for RPC endpoints.

Note: This is technically a breaking change because prior to this patch we inadvertently support multiple RPC endpoints as a csv, via the FallbackProvider. Now only a single endpoint will work.

Metadata
ENG-2062

@changeset-bot
Copy link

changeset-bot bot commented Mar 14, 2022

🦋 Changeset detected

Latest commit: 2163f1a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@eth-optimism/data-transport-layer Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov-commenter
Copy link

codecov-commenter commented Mar 14, 2022

Codecov Report

Merging #2322 (096f213) into develop (ccd9881) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #2322   +/-   ##
========================================
  Coverage    80.08%   80.08%           
========================================
  Files           77       77           
  Lines         2460     2460           
  Branches       450      450           
========================================
  Hits          1970     1970           
  Misses         490      490           
Flag Coverage Δ
contracts 99.29% <ø> (ø)
core-utils 86.77% <ø> (ø)
data-transport-layer 49.72% <ø> (ø)
sdk 55.75% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ccd9881...096f213. Read the comment docs.

@tynes
Copy link
Contributor

tynes commented Mar 14, 2022

We previously only did minor releases when we did a regenesis. I'm not super opinionated on whether or not we should continue not following semver the way that it was supposed to be used

if (typeof this.options.l1RpcProvider === 'string') {
this.state.l1RpcProvider = FallbackProvider(this.options.l1RpcProvider, {
'User-Agent': 'data-transport-layer',
this.state.l1RpcProvider = new StaticJsonRpcProvider({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

proxyd should be able to handle the retry logic now, so making this change should be fine

@mslipper
Copy link
Collaborator

What's the context for adding auth? Is there an upstream provider that requires this?

@Inphi
Copy link
Contributor Author

Inphi commented Mar 15, 2022

We previously only did minor releases when we did a regenesis. I'm not super opinionated on whether or not we should continue not following semver the way that it was supposed to be used

I see. I can make it patch in that case. We should have a discussion later about this though.

@tynes
Copy link
Contributor

tynes commented Mar 15, 2022

proxyd supports auth, so this would allow the dtl to consume proxyd that is set up with auth

@Inphi Inphi merged commit 86b3445 into ethereum-optimism:develop Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants